<template>
  <div>
    <el-container>
      <el-main>
        <div class="contentShadow">
          <h1>学生论文成果</h1>
          <el-radio-group v-model="size">
            <el-radio label="">默认</el-radio>
            <el-radio label="medium">中等</el-radio>
            <el-radio label="small">小型</el-radio>
            <el-radio label="mini">超小</el-radio>
          </el-radio-group>
          <el-descriptions class="des" direction="vertical" :column="4" :size="size" border>
            <el-descriptions-item :span="4">
              <template slot="label">
                <i class="el-icon-s-promotion"></i>
                标题
              </template>
              {{ paper.paperTitle }}
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-user-solid"></i>
                姓名
              </template>
              <el-tag type="success" :size="size">{{ paper.name }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-user"></i>
                学号
              </template>
              <el-tag type="main" :size="size">{{ paper.studentId }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-paperclip"></i>
                类型
              </template>
              <el-tag type="warning" :size="size">
                <template v-if="paper.type === 1">期刊</template>
                <template v-else-if="paper.type === 2">会议</template>
                <template v-else-if="paper.type === 3">学位论文</template>
                <template v-else-if="paper.type === 4">其它</template>
              </el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-date"></i>
                发表日期
              </template>
              <el-tag type="danger" :size="size">{{ paper.date }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="3">
              <template slot="label">
                <i class="el-icon-s-custom"></i>
                作者
              </template>
              {{ paper.author }}
            </el-descriptions-item>
            <el-descriptions-item :span="1">
              <template slot="label">
                <i class="el-icon-coordinate"></i>
                位次
              </template>
              {{ paper.order }}
            </el-descriptions-item>
            <el-descriptions-item :span="4">
              <template slot="label">
                <i class="el-icon-document"></i>
                摘要
              </template>
              {{ paper.paperAbstract }}
            </el-descriptions-item>
            <el-descriptions-item :span="4">
              <template slot="label">
                <i class="el-icon-umbrella"></i>
                关键字
              </template>
              {{ paper.paperKeyword }}
            </el-descriptions-item>
            <el-descriptions-item :span="4">
              <template slot="label">
                <i class="el-icon-magic-stick"></i>
                奖励
              </template>
              {{ paper.award }}
            </el-descriptions-item>
          </el-descriptions>
        </div>
      </el-main>
    </el-container>
  </div>
</template>


<style scoped>
.assess-page {
  height: 100%;
  /* left:50%; */
}

.content {
  margin-left: 20%;
  margin-top: 1%;
  padding-left: 5%;
  padding-right: 5%;
  padding-top: 3%;
  padding-bottom: 5%;
  /* font-size: 26; */
  width: 50%;
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.des {
  font-size: larger;
}
</style>
<script>
import {findPaperDetail} from "@/api/admin";

export default {
  data() {
    return {
      size: '',
      paper: {
        paperId: 0,
        paperTitle: "这里是标题",
        paperAbstract: "这里是摘要",
        paperKeyword: "关键字1;关键字2",
        type: 3,
        date: "2022-01-01",
        author: "作者1;作者2",
        order: 1,
        studentId: "2200012345",
        name: "张三",
      },
    }
  },
  mounted() {
    this.paper.paperId = Number(window.location.search.substring(4));
    findPaperDetail(this.paper.paperId).then(res => {
      this.paper = res.data
    })
  },
  methods: {}
}
</script>
